<%@ include file="/WEB-INF/views/framework/global.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>个人信息维护</title>
</head>
<body class="kk">
	<ul class="nav nav-tabs g_navbar">
	  <li class="active"><a href="#">个人信息管理</a></li>
  </ul><br><br>
	<!-- row -->
	<div class="row" style="width:99%; margin:0 auto;">
		<div class="col-md-2"></div>
		<div class="col-md-8">
			<form class="form-horizontal" id="my_form" role="form" action="${path}/paper/user/update" method="post">
				<input type="hidden" id="id" name="id"  value="${user.id}"/>
				<div class="form-group">
					<label class="col-lg-2 control-label" for="exampleInputEmail1">姓名</label>
					<div class="col-lg-10">
						<input type="text" class="form-control" id="exampleInputEmail1" name="name" value=${user.name}>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label" for="exampleInputEmail1">联系方式(手机)</label>
					<div class="col-lg-10">
						<input type="text" class="form-control" id="exampleInputEmail1" name="phone" value=${user.phone}>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label" for="exampleInputEmail1">邮件</label>
					<div class="col-lg-10">
						<input type="text" class="form-control" id="exampleInputEmail1" name="email" value=${user.email}>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label" for="exampleInputEmail1">QQ</label>
					<div class="col-lg-10">
						<input type="text" class="form-control" id="exampleInputEmail1" name="QQ" value=${user.QQ}>
					</div>
				</div>
				<sec:authorize access="hasRole('TEACHER')">
				<div class="form-group">
					<label class="col-lg-2 control-label" for="unit">专业</label>
					<div class="col-lg-10 rel">
						<div class="popover fade bottom in" id="element" style="display: block; left:0; top:36px; width:100%; max-width:1000px; display:none;">
							<div class="arrow"></div>
							<h3 class="popover-title">专业选择</h3>
							<div class="popover-content">
								<ul id="appTree" class="ztree"></ul>
							</div>
						</div>
						<input class="form-control" id="unit" name="unit" readonly="readonly" value="${user.account.unit.name}" data-value="${user.account.unit.id}">
					</div>
				</div>
				</sec:authorize>
				
				<sec:authorize access="hasRole('STUDENT')">
				<div class="form-group">
					<label class="col-lg-2 control-label" for="unit">班级</label>
					<div class="col-lg-10 rel">
						<div class="popover fade bottom in" id="element" style="display: block; left:0; top:36px; width:100%; max-width:1000px; display:none;">
							<div class="arrow"></div>
							<h3 class="popover-title">班级选择</h3>
							<div class="popover-content">
								<ul id="appTree" class="ztree"></ul>
							</div>
						</div>
						<input class="form-control" id="unit" name="unit" readonly="readonly" value="${user.account.unit.name}" data-value="${user.account.unit.id}">
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label" for="teacher">教师</label>
					<div class="col-lg-10">
						<select type="text" class="form-control" id="teacher" name="teacher" data-value="${user.teacher.id}"></select>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label" for="graduate">毕业年份</label>
					<div class="col-lg-10">
						<select class="form-control" id="graduate" name="graduate" data-value=${user.graduate}></select>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label" for="exampleInputEmail1">学位</label>
					<div class="col-lg-10">
						<select class="form-control" id="degree" name="degree" data-codelist="STUDENT-DEGREE" data-value="${user.degree}"></select>
					</div>
				</div>
				</sec:authorize>			
				<div class="form-group tc">
					<button type="button" class="btn btn-default mr20" id="back">返回</button>
					<button type="submit" class="btn btn-success mr20" id="submit">保存</button>
				</div>
			</form>
		</div>
		<div class="col-md-2"></div>
	</div><!-- /row -->
	<script type="text/javascript">
		var parentUnitId = '${user.account.unit.parentId}';
	</script>
	<script src="${cmpRoot}/user_update.js"></script>
</body>
</html>
